import 'dart:convert' show json;

class Wenda {

  int code;
  String msg;
  List<wendas> newslist;

  Wenda.fromParams({this.code, this.msg, this.newslist});

  factory Wenda(jsonStr) => jsonStr == null ? null : jsonStr is String ? new Wenda.fromJson(json.decode(jsonStr)) : new Wenda.fromJson(jsonStr);

  Wenda.fromJson(jsonRes) {
    code = jsonRes['code'];
    msg = jsonRes['msg'];
    newslist = jsonRes['newslist'] == null ? null : [];

    for (var newslistItem in newslist == null ? [] : jsonRes['newslist']){
      newslist.add(newslistItem == null ? null : new wendas.fromJson(newslistItem));
    }
  }

  @override
  String toString() {
    return '{"code": $code,"msg": ${msg != null?'${json.encode(msg)}':'null'},"newslist": $newslist}';
  }
}

class wendas {

  String quest;
  String result;

  wendas.fromParams({this.quest, this.result});

  wendas.fromJson(jsonRes) {
    quest = jsonRes['quest'];
    result = jsonRes['result'];
  }

  @override
  String toString() {
    return '{"quest": ${quest != null?'${json.encode(quest)}':'null'},"result": ${result != null?'${json.encode(result)}':'null'}}';
  }
}

